<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/common/head.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>个人资料</title>
<link href="${resource }/css/bootstrap.css" rel="stylesheet">
<link href="${resource }/font-awesome/css/font-awesome.css?v=4.3.0"
	rel="stylesheet">
<link href="${resource }/css/animate.css" rel="stylesheet">
<link href="${resource }/css/style.css?v=2.2.0" rel="stylesheet">
<link rel="stylesheet" href="${resource }/css/iconfont.css" />
<script src="${resource }/js/jquery-2.1.1.min.js"></script>
<script src="${resource }/js/jquery.form.js"></script>
<script src="${resource }/js/bootstrap.min.js?v=3.4.0"></script>
</head>

<body style="background-color: #f3f3f4;">
	<div class="row wrapper border-bottom white-bg page-heading">
		<div class="col-lg-10">

			<h2>个人资料</h2>
			<ol class="breadcrumb">
				<li><a href="${basepath }/index.do">主页</a></li>
				<li><strong>个人资料</strong></li>
			</ol>
		</div>
		<div class="col-lg-2"></div>
	</div>

	<!--
            	作者：985379016@qq.com
            	时间：2018-08-27
            	描述：资料模块
            -->
	<div class="wrapper wrapper-content">
		<div class="row animated fadeInRight">
			<div class="col-md-4">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>个人资料</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a> <a class="close-link"> <i class="fa fa-times"></i>
							</a>
						</div>
					</div>

					<div>
						<div class="ibox-content border-left-right profile-content">
							<hr class="border-bottom">
							<h4>
								<strong>头像</strong>
							</h4>
							<!--
                                  	作者：985379016@qq.com
                                  	时间：2018-08-27
                                  	描述：此处用来显示用户头像
                             -->
							<img alt="image" class="img-responsive"
								src="${resource }/img/profile_big.jpg">
						</div>
						<div class="ibox-content profile-content">
							<h4>
								<strong>用户名:<span class="label label-primary">${user.userAccount }</span></strong>
							</h4>
							<hr class="border-bottom">
							<h4>
								<strong>电&nbsp&nbsp&nbsp&nbsp话:<span class="label label-primary">${user.userTel}</span></strong>
							</h4>
							<hr class="border-bottom">
							<c:if test="${user.userState eq '1'}">
							<h4>状&nbsp&nbsp&nbsp&nbsp态:<span class="label label-primary">正在使用</span></h4>
							</c:if>
							<c:if test="${user.userState eq '0'}">
							<h4>状&nbsp&nbsp&nbsp&nbsp态:<span class="label label-primary">已冻结</span></h4>
							</c:if>
							<div class="row m-t-lg">
								<div class="col-md-6">
									<span class="bar">5,3,9,6,5,9,7,3,5,2</span>
									<h5>
										<strong>${logcount }</strong>  <a class="link-block" href="../log/show.do"><br><br>日志</a>
									</h5>
								</div>

								<div class="col-md-6">
									<span class="bar">5,3,2,-1,-3,-2,2,3,5,2</span>
									<h5>
										<strong>${wcount }</strong> <a class="link-block" href="../myflow/myapply.do?id=1"><br><br>流程</a>
									</h5>
								</div>
							</div>
							<div class="user-button">
								<div class="row">
									<div class="col-md-12">
										<div id="edit">
											<a data-toggle="modal" class="btn btn-primary btn-sm btn-block" href="profile.jsp#modal-form1" ><i class="fa fa-envelope"></i> 修改个人信息</a>
										</div>
									</div>

								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--资料模块到此结束-->
			
			<!--
                	作者：985379016@qq.com
                	时间：2018-08-27
                	描述：日志模块
             -->
			<div class="col-md-8">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>日志</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a> <a class="close-link"> <i class="fa fa-times"></i>
							</a>
						</div>
					</div>

					<div class="ibox-content">
						<div>
							<div class="feed-activity-list">

								<!-- 日志循环模块 -->
								<c:if test=""></c:if>
								<c:forEach   var="logc"  items="${clist}">
									<div class="feed-element">
										<a href="profile.html#" class="pull-left"> 
										<img alt="image" class="img-circle" src="${resource }/img/a1.jpg">
										</a>
										<div class="media-body ">
											<small class="pull-right text-navy">${logc.date}</small> <strong>标题：${logc.logTitle }</strong><br>
											<small>评论数量：${logc.commentNum }:</small> <br>
											<!-- 评论模块 -->
											<div class="col-md-16">
												<div class="ibox float-e-margins">
													<div class="ibox-tools">
														<a class="collapse-link"> 评论<i
															class="fa fa-chevron-up"></i>
														</a>
													</div>
													<div class="ibox-content" style="display: none">
														<div class="feed-activity-list">
														<!-- 评论的循环模块 -->
															<c:forEach  var="comment"  items="${map.get(logc.id)}"> 
																<div class="feed-element">
																 <img alt="image" class="img-circle" src="${resource }/img/a1.jpg">
																	<div class="media-body ">
																		<small class="pull-right text-navy">${comment.commentDate }</small> 
																		<strong>评论用户：${comment.userId }</strong><hr>
																		<small>评论：${comment.commentInfo}</small>
																	</div>
																</div>
															</c:forEach>
														<!-- 评论的循环模块 -->
														</div>
													</div>
												</div>
											</div>
											<!-- 评论模块到此结束 -->
										</div>
									</div>
							</c:forEach>
							<!-- 日志循环模块 -->

							<button id="moreInfo" class="btn btn-primary btn-block m">
								<i class="fa fa-arrow-down"></i> 显示所有
							</button>
						</div>
					</div>
				</div>
				<!--日志模块到此结束-->
			</div>
		</div>
	</div>

	
	</div>

	<!-- 遮罩窗体的form表单 用来提交修改后的数据 -->
	<div id="modal-form1" class="modal fade" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-body">
						<div class="row">
							<div class="col-sm-12 b-r">
								<h3 class="m-t-none m-b">修改个人信息</h3>
								<form role="form" id="inputForm" action="update.do" method="post">
									<div class="form-group">
										<label>用户ID：</label>
										<input name="id" id="id" type="text"  value="${user.id }" class="form-control" readonly="readonly">
										<label>用户名：</label>
										<input name="userAccount" id="userAccount" type="text" value="${user.userAccount }" class="form-control" autocomplete="off">
										<label>密码：</label>
										<input name="userPwd" id="userPwd" type="text" value="${user.userPwd }" class="form-control"autocomplete="off">
										<label>真实姓名：</label>
										<input name="userName" id="userName" type="text" value="${user.userName }" class="form-control" autocomplete="off">
										<label>电话：</label>
										<input name="userTel" id="userTel" type="text" value="${user.userTel }" class="form-control" autocomplete="off">
									</div>
									<div align="center">
										<input id="save" type="submit"  class="btn btn-primary btn-sm btn-block"  value="提交修改"/>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 遮罩窗体的form表单 -->

	<!-- Mainly scripts -->
	<script src="${resource }/js/jquery-2.1.1.min.js"></script>
	<script src="${resource }/js/bootstrap.min.js?v=3.4.0"></script>
	<script src="${resource }/js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script
		src="${resource }/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

	<!-- Custom and plugin javascript -->
	<script src="${resource }/js/hplus.js?v=2.2.0"></script>
	<script src="${resource }/js/plugins/pace/pace.min.js"></script>

	<!-- Peity -->
	<script src="${resource }/js/plugins/peity/jquery.peity.min.js"></script>

	<!-- Peity -->
	<script src="${resource }/js/demo/peity-demo.js"></script>
	

	<!-- 点击显示所有按钮后  重新请求  查询所有的日志 -->
	<script type="text/javascript">
		$("#moreInfo").click(function(){
			window.location.href= "show.do?sign=1";
		});
	</script>


</body>

</html>